import { postClient } from '@/utils/https';

// ------------ accessKey ------------
// 根据用户id，获取accessKeyList
export const getAccessList = (userId: string) => {
  return postClient(`/access/list`, { userId });
};

export const findAccess = (userId: string, accessKey: string) => {
  return postClient(`/access/find`, { userId, accessKey });
};

// 根据accessKeyId，禁用accessKey
export const disableAccess = (userId: string, accessKey: string) => {
  return postClient(`/access/disable`, { userId, accessKey });
};

// 创建accessKey
export const createAccess = (userId: string) => {
  return postClient('/access/create', { userId });
};
